package com.myfb.antstorm.service.ribbon;

import com.myfb.antstorm.service.ribbon.annotation.ExcudeAnnotation;
import com.myfb.antstorm.service.ribbon.confige.MyRibbonRuleConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableDiscoveryClient
//@RibbonClient(name = "service-demo",configuration = {MyRibbonRuleConfig.class})
//@ComponentScan(excludeFilters={@ComponentScan.Filter(value = {ExcudeAnnotation.class})})
public class ServiceRibbonApplication {

	public static void main(String[] args) {
		SpringApplication.run(ServiceRibbonApplication.class, args);
	}

	@Bean
	@LoadBalanced
	RestTemplate restTemplate() {
		return new RestTemplate();
	}
}
